//
//  HSParameters.h
//  HSMediator
//
//  Created by fan on 2021/10/15.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^HSDefaultCallBack)(void);

typedef void(^HSValueCallBack)(id _Nullable);

@interface HSParameters : NSObject
/// 参数字典
@property (nonatomic, readonly) NSDictionary *params;

/// 没有返回值的block
@property (nonatomic, copy) HSDefaultCallBack defaultCallBack;

/// 有返回值的block
@property (nonatomic, copy) HSValueCallBack valueCallBack;

/// 初始化方法链式语法 传入参数字典
+ (HSParameters *(^)(NSDictionary *))parameters;

/// 初始化方法
+ (HSParameters *)create;

/// 设置数据的key
- (HSParameters *(^)(NSString *))key;

/// 设置数据
- (HSParameters *(^)(id))value;

/// valueForKey链式语法
- (nullable id(^)(NSString *))valueForKey;

/// defaultCallBack 链式语法
- (HSParameters *(^)(HSDefaultCallBack))defaultCB;

/// valueCallBack 链式语法
- (HSParameters *(^)(HSValueCallBack))valueCB;
@end

NS_ASSUME_NONNULL_END
